<template>
  <bg-lay-out>
    <div slot="headerText">人力资源绩效管理</div>
    <top-bar-sel :barWidth="'67%'" slot="headerMain"  :topNav="topNav" @changeTab="onNav"></top-bar-sel>
    <div slot="main" style="position:relative">
    	<div v-if="tabId === '1'">
    		<sell-summarizing :time="statisticalTime"></sell-summarizing>
    	</div>
    	<div v-else>
    		<sell-branch-office :groupPlate="tabId" :time="statisticalTime"></sell-branch-office>
    	</div>
    </div>
  </bg-lay-out>
</template>
<script>
import bgLayOut from "@/components/bgLayOut/index";
import sellBranchOffice from "./sellBranchOffice";
import sellSummarizing from "./sellSummarizing";
import topBarSel from "@/components/branch/topBarSel";
export default {
  name: "index",
  components: {
    bgLayOut,
    sellBranchOffice,
    sellSummarizing,
    topBarSel
  },
  data() {
    return {
      tabId: "1",
      statisticalTime: "",
      topNav: [
        {
          name: "全部",
          id: "1"
        },
        {
          name: "集团",
          id: "9003"
        },

        {
          name: "金控",
          id: "9005"
        },
        {
          name: "浩德投资",
          id: "9007"
        },
        {
          name: "产业园",
          id: "9006"
        },
        {
          name: "房联行",
          id: "9001"
        },
        {
          name: "浩德鑫置地",
          id: "9002"
        },
        {
          name: "浩德钢圈",
          id: "9004"
        },
        {
          name: "融媒运营",
          id: "9008"
        }
      ]
    };
  },
  mounted() {},
  methods: {
    onTime(res) {
      (this.statisticalTime = res)
      this.onNav(this.tabId);
    },
    onNav(id) {
      this.tabId = id;
    },
    // 跳页面
    pushPage(name) {
      this.$router.push({
        path: name
      });
    }
  }
};
</script>
<style>
@import "../../../../styles/element-ui/select.css";
</style>
<style scoped>
.selDateCon {
  position: absolute;
  top: 0;
  z-index: 3;
}
</style>
